<template>
<div>
<button type="button" class="vue-btn vue-btn-default" @click="showAlert">Confirm</button>

<Confirm 
:visible="confirm.visible"
:title="confirm.title"
:content="confirm.content"
:on-ok="confirm.onOk"
:on-cancel="confirm.onCancel"
></Confirm>
</div>
</template>

<script>
import Confirm from "components/message/confirm"

export default{
	components:{
 		Confirm
 	},
 	data(){
 		var self=this;
 		return{
	 		"confirm":{
	 			visible:false,
	 			title:"ConfirmTitle",
	 			content:"这是一个Confrim弹出框。",
	 			onOk:function(ev){
	 				self.confirm.visible=false;
		 		},
		 		onCancel:function(ev){
	 				self.confirm.visible=false;
		 		}
	 		}
 		}
 	},
 	methods:{
 		showAlert:function(){
 			this.confirm.visible=true;
 		}
 	}
}
</script>